home *** CD-ROM | disk | FTP | other *** search
- Path: theory.lcs.mit.edu!wald
- From: wald@theory.lcs.mit.edu (David Wald)
- Newsgroups: comp.lang.c++
- Subject: Re: SGI's C++ compiler and the boolean type
- Date: 11 Apr 1996 18:01:52 GMT
- Organization: Theory of Computation, LCS, MIT
- Message-ID: <WALD.96Apr11140152@woodpecker.lcs.mit.edu>
- References: <4kefm7$oao@ncar.ucar.edu> <4kg6fv$h7k@nic.ftns.no>
- <WALD.96Apr11105913@woodpecker.lcs.mit.edu>
- <4kjafs$h4b@decaxp.HARVARD.EDU>
- NNTP-Posting-Host: woodpecker.lcs.mit.edu
- In-reply-to: ccshan@scws40.harvard.edu's message of 11 Apr 1996 16:03:08 GMT
-
- In article <4kjafs$h4b@decaxp.HARVARD.EDU> ccshan@scws40.harvard.edu
- (Chung-chieh Shan) writes:
- >> No user-level definition of bool will make distinguish() return 0, as
- >> it must in the draft standard.
- >
- >Hmm, why can't I just define bool as a class? I realize there are
- >problems with some library routines
-
- Not just library routines; as I said in [the deleted portion of] my
- post, the comparison operators on base types also must return bool in
- the standard, and there's no way to redefine those operators in C++ to
- return a user-defined class. A compiler-supplied bool is the only way
- to get the (draft) standard overloading behavior.
-
- -David
- --
- ============================================================================
- David Wald http://theory.lcs.mit.edu/~wald/ wald@theory.lcs.mit.edu
- ============================================================================
-